package cn.tedu._01mvcboot01.controller;

import cn.tedu._01mvcboot01.pojo.dto.UpdateCarDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
public class CarController {

    @PostMapping("/v1/car/add")
    @ResponseBody
    public String addCar(String brand,String license,double price) {
        return "添加车辆成功"+brand+"-"+license+"-"+price;
    }


    @RequestMapping("/v1/car/update")
    @ResponseBody
    public String updateCar(UpdateCarDTO updataCarDTO) {
        System.out.println("更新车辆"+updataCarDTO);
        return "更新车辆成功";
    }
}
